home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume6 / xdvi / patch7 next >
Encoding:
Internet Message Format  |  1990-02-27  |  33.2 KB

  1. Path: uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!sun-barr!newstop!sun!turnpike!argv
  2. From: argv%turnpike@Sun.COM (Dan Heller)
  3. Newsgroups: comp.sources.x
  4. Subject: v06i005: xdvi, Patch7
  5. Message-ID: <132319@sun.Eng.Sun.COM>
  6. Date: 28 Feb 90 09:49:35 GMT
  7. Sender: news@sun.Eng.Sun.COM
  8. Lines: 1081
  9. Approved: argv@sun.com
  10.  
  11. Submitted-by: vojta@guinness.ias.edu (Paul A Vojta)
  12. Posting-number: Volume 6, Issue 5
  13. Archive-name: xdvi/patch7
  14. Patch-To: xdvi: Volume 3, Issue 37-39,46,57
  15. Patch-To: xdvi: Volume 4, Issue 44,96
  16. Patch-To: xdvi: Volume 5, Issue 35-36
  17.  
  18. This is patch 7 for xdvi.  It replaces the -pagewidth and -pageheight
  19. options with a -paper option which is more convenient to use.
  20.  
  21. Thanks to iis!prl, bingle@cs.purdue.edu, boaz@neutron.lcs.mit.edu, and
  22. others for fixes and bug reports.
  23.  
  24. --Paul Vojta, vojta@guinness.ias.edu
  25.  
  26. -- cut here --
  27. diff -cr old/README new/README
  28. *** old/README    Sun Feb  4 13:09:22 1990
  29. --- new/README    Sun Feb  4 12:50:09 1990
  30. ***************
  31. *** 42,48 ****
  32.               the left.  For performance reasons, it would be best
  33.               to set this to coincide with what your server uses.
  34.               Use the keystroke '^P' to find information in this
  35. !             regard.
  36.       BMSHORT        (X11 only; xdvi.c dvi_draw.c gf.c pk.c pxl.c)  Store
  37.               bitmaps in short integers instead of bytes.  See
  38.               MSBITFIRST for other relevant comments.  To check
  39. --- 42,52 ----
  40.               the left.  For performance reasons, it would be best
  41.               to set this to coincide with what your server uses.
  42.               Use the keystroke '^P' to find information in this
  43. !             regard.  Generally, you should use MSBITFIRST if and
  44. !             only if '^P' reports bitord = 1, and BMSHORT/BMLONG
  45. !             (below) should be set to match whatever '^P' reports
  46. !             under "Unit =".  But, if bitord = byteord, then the
  47. !             latter setting should not matter much.
  48.       BMSHORT        (X11 only; xdvi.c dvi_draw.c gf.c pk.c pxl.c)  Store
  49.               bitmaps in short integers instead of bytes.  See
  50.               MSBITFIRST for other relevant comments.  To check
  51. ***************
  52. *** 50,58 ****
  53.                   time xdvi -d 8 file.dvi
  54.       BMLONG        (X11 only; xdvi.c dvi_draw.c gf.c pk.c pxl.c)  Store
  55.               bitmaps in long integers instead of bytes.
  56. !     ALTFONT        Default font to use if the font named in the dvi file
  57. !             cannot be found.  Can be set to NULL.  By default, it
  58. !             is "cmr10".
  59.       NOTOOL        (X11 only; xdvi.c)  Compile using raw X calls.
  60.       BUTTONS        (xdvi.c)  Put radio buttons on the right side of the
  61.               window for commonly used commands.
  62. --- 54,62 ----
  63.                   time xdvi -d 8 file.dvi
  64.       BMLONG        (X11 only; xdvi.c dvi_draw.c gf.c pk.c pxl.c)  Store
  65.               bitmaps in long integers instead of bytes.
  66. !     ALTFONT        (xdvi.c)  Default font to use if the font named in the
  67. !             dvi file cannot be found.  Can be set to NULL.  By
  68. !             default, it is "cmr10".
  69.       NOTOOL        (X11 only; xdvi.c)  Compile using raw X calls.
  70.       BUTTONS        (xdvi.c)  Put radio buttons on the right side of the
  71.               window for commonly used commands.
  72. ***************
  73. *** 168,172 ****
  74. --- 172,178 ----
  75.      19.  Added -pagewidth and -pageheight command line options and A4
  76.       compilation option.
  77.      20.  Added a yet more robust font finding algorithm.
  78. + --  Patchlevel 7:  --
  79. +    21.  Replaced -pagewidth and -pageheight options with -paper.
  80.   
  81.   Paul Vojta, vojta@math.berkeley.edu
  82. diff -cr old/dvi_draw.c new/dvi_draw.c
  83. *** old/dvi_draw.c    Sun Feb  4 13:09:25 1990
  84. --- new/dvi_draw.c    Mon Jan 29 22:48:24 1990
  85. ***************
  86. *** 303,309 ****
  87.       if (ch > maxchar ||
  88.           (g = ¤t_font->glyph[ch])->bitmap.bits == NULL) {
  89.           if (ch > maxchar || g->addr == 0)
  90. !         oops("Character %d not defined in font %s\n", ch,
  91.               current_font->fontname);
  92.           open_pxl_file(current_font);
  93.           Fseek(current_font->file, g->addr, 0);
  94. --- 303,309 ----
  95.       if (ch > maxchar ||
  96.           (g = ¤t_font->glyph[ch])->bitmap.bits == NULL) {
  97.           if (ch > maxchar || g->addr == 0)
  98. !         oops("Character %d not defined in font %s", ch,
  99.               current_font->fontname);
  100.           open_pxl_file(current_font);
  101.           Fseek(current_font->file, g->addr, 0);
  102. ***************
  103. *** 361,367 ****
  104.           close_a_file();
  105.           fontp->file = fopen(fontp->filename, OPEN_MODE);
  106.           if (fontp->file == NULL)
  107. !         oops("Font file disappeared:  %s\n", fontp->filename);
  108.           --n_fonts_left;
  109.       }
  110.   }
  111. --- 361,367 ----
  112.           close_a_file();
  113.           fontp->file = fopen(fontp->filename, OPEN_MODE);
  114.           if (fontp->file == NULL)
  115. !         oops("Font file disappeared:  %s", fontp->filename);
  116.           --n_fonts_left;
  117.       }
  118.   }
  119. diff -cr old/dvi_init.c new/dvi_init.c
  120. *** old/dvi_init.c    Sun Feb  4 13:09:27 1990
  121. --- new/dvi_init.c    Sun Dec 10 20:50:19 1989
  122. ***************
  123. *** 69,78 ****
  124.    */
  125.   static    long    last_page_offset;
  126.   
  127. ! #ifndef    ANSI_LIB
  128.   char    *sprintf();
  129. ! #endif
  130. ! char    *malloc(), *strcpy();
  131.   FILE    *pxl_open();
  132.   
  133.   /*
  134. --- 69,79 ----
  135.    */
  136.   static    long    last_page_offset;
  137.   
  138. ! #ifdef    sun
  139.   char    *sprintf();
  140. ! #endif    sun
  141. ! char    *malloc();
  142.   FILE    *pxl_open();
  143.   
  144.   /*
  145. diff -cr old/mksedscript new/mksedscript
  146. *** old/mksedscript    Sun Feb  4 13:09:30 1990
  147. --- new/mksedscript    Sun Feb  4 13:01:47 1990
  148. ***************
  149. *** 1,4 ****
  150. ! #! /bin/csh
  151.   unset    x10 buttons a4
  152.   set    noglob
  153.   foreach x ($argv[3-])
  154. --- 1,4 ----
  155. ! #! /bin/csh -f
  156.   unset    x10 buttons a4
  157.   set    noglob
  158.   foreach x ($argv[3-])
  159. ***************
  160. *** 16,22 ****
  161.   if (! $?buttons)    echo /^\#ifbuttons/,/^\#/d
  162.   echo    /^\#/d
  163.   if ($?a4) then
  164. !     echo    s/%%defaultpagesize%%/8.3 x 11.7 inches (A4 size)/
  165.   else
  166.       echo    s/%%defaultpagesize%%/8.5 x 11 inches/
  167.   endif
  168. --- 16,22 ----
  169.   if (! $?buttons)    echo /^\#ifbuttons/,/^\#/d
  170.   echo    /^\#/d
  171.   if ($?a4) then
  172. !     echo    's/%%defaultpagesize%%/21 x 29.7 cm (A4 size)/'
  173.   else
  174.       echo    s/%%defaultpagesize%%/8.5 x 11 inches/
  175.   endif
  176. diff -cr old/patchlevel.h new/patchlevel.h
  177. *** old/patchlevel.h    Sun Feb  4 13:09:31 1990
  178. --- new/patchlevel.h    Sun Dec 10 21:52:09 1989
  179. ***************
  180. *** 1 ****
  181. ! #define PATCHLEVEL 6
  182. --- 1 ----
  183. ! #define PATCHLEVEL 7
  184. diff -cr old/pk.c new/pk.c
  185. *** old/pk.c    Sun Feb  4 13:09:33 1990
  186. --- new/pk.c    Mon Jan 29 22:49:58 1990
  187. ***************
  188. *** 105,111 ****
  189.           case PK_NOOP :
  190.             break;
  191.           default :
  192. !           oops("Unexpected %d in PK file %s\n", PK_flag_byte,
  193.           fontp->fontname);
  194.             break;
  195.           }
  196. --- 105,111 ----
  197.           case PK_NOOP :
  198.             break;
  199.           default :
  200. !           oops("Unexpected %d in PK file %s", PK_flag_byte,
  201.           fontp->fontname);
  202.             break;
  203.           }
  204. ***************
  205. *** 131,140 ****
  206.       Printf("Reading header for PK pixel file %s\n", fontp->filename);
  207.   
  208.     if (one(fontp->file) != PK_PRE)
  209. !     oops("File %s lacks preamble command\n", fontp->fontname);
  210.   
  211.     if (one(fontp->file) != PK_ID)
  212. !     oops("File %s has wrong PK id\n", fontp->fontname);
  213.   
  214.     Fseek(fontp->file, (long) one(fontp->file), 1);    /* skip comment */
  215.   
  216. --- 131,140 ----
  217.       Printf("Reading header for PK pixel file %s\n", fontp->filename);
  218.   
  219.     if (one(fontp->file) != PK_PRE)
  220. !     oops("File %s lacks preamble command", fontp->fontname);
  221.   
  222.     if (one(fontp->file) != PK_ID)
  223. !     oops("File %s has wrong PK id", fontp->fontname);
  224.   
  225.     Fseek(fontp->file, (long) one(fontp->file), 1);    /* skip comment */
  226.   
  227. ***************
  228. *** 143,149 ****
  229.     hppp = sfour(fontp->file);
  230.     vppp = sfour(fontp->file);
  231.     if( debug && hppp != vppp )
  232. !     oops("Warning: aspect ratio not 1:1 for font %s\n", fontp->fontname);
  233.     /*fontp->f_scale = (int)((((float) hppp * 72.27) / (float) 65536) + 0.5);*/
  234.   
  235.     /*if (fontp->f_scale == 0) fontp->f_scale = 1000;*/
  236. --- 143,149 ----
  237.     hppp = sfour(fontp->file);
  238.     vppp = sfour(fontp->file);
  239.     if( debug && hppp != vppp )
  240. !     oops("Warning: aspect ratio not 1:1 for font %s", fontp->fontname);
  241.     /*fontp->f_scale = (int)((((float) hppp * 72.27) / (float) 65536) + 0.5);*/
  242.   
  243.     /*if (fontp->f_scale == 0) fontp->f_scale = 1000;*/
  244. ***************
  245. *** 224,230 ****
  246.       w = num(fp, n);
  247.       h = num(fp, n);
  248.       if (w > 0x7fff || h > 0x7fff)
  249. !         oops("Too large character (%d) in file %s\n", ch, fontp->fontname);
  250.       g->bitmap.w = w;
  251.       g->bitmap.h = h;
  252.       }
  253. --- 224,230 ----
  254.       w = num(fp, n);
  255.       h = num(fp, n);
  256.       if (w > 0x7fff || h > 0x7fff)
  257. !         oops("Too large character (%d) in file %s", ch, fontp->fontname);
  258.       g->bitmap.w = w;
  259.       g->bitmap.h = h;
  260.       }
  261. ***************
  262. *** 354,362 ****
  263.             paint_switch = 1 - paint_switch;
  264.           }
  265.         if (cp != ((BMUNIT *) (g->bitmap.bits + bytes_wide * g->bitmap.h)))
  266. !         oops("Wrong number of bits stored:  char. %d, font %s\n", ch,
  267.           fontp->fontname);
  268.         if (rows_left != 0 || h_bit != g->bitmap.w)
  269. !         oops("Bad pk file (%s), too many bits\n", fontp->fontname);
  270.       }
  271.   }
  272. --- 354,362 ----
  273.             paint_switch = 1 - paint_switch;
  274.           }
  275.         if (cp != ((BMUNIT *) (g->bitmap.bits + bytes_wide * g->bitmap.h)))
  276. !         oops("Wrong number of bits stored:  char. %d, font %s", ch,
  277.           fontp->fontname);
  278.         if (rows_left != 0 || h_bit != g->bitmap.w)
  279. !         oops("Bad pk file (%s), too many bits", fontp->fontname);
  280.       }
  281.   }
  282. diff -cr old/pxl.c new/pxl.c
  283. *** old/pxl.c    Sun Feb  4 13:09:34 1990
  284. --- new/pxl.c    Mon Jan 29 22:50:14 1990
  285. ***************
  286. *** 63,69 ****
  287.           Printf("Reading header for PXL file %s\n", fontp->filename);
  288.       fontp->read_char = read_char;
  289.       if (four(fp = fontp->file) != 1001)
  290. !         oops("File %s has wrong PXL magic number.\n", fontp->filename);
  291.       /* seek to trailer info */
  292.       Fseek(fp, (long) -5 * 4, 2);
  293.       (void) four(fp);    /* checksum */
  294. --- 63,69 ----
  295.           Printf("Reading header for PXL file %s\n", fontp->filename);
  296.       fontp->read_char = read_char;
  297.       if (four(fp = fontp->file) != 1001)
  298. !         oops("File %s has wrong PXL magic number.", fontp->filename);
  299.       /* seek to trailer info */
  300.       Fseek(fp, (long) -5 * 4, 2);
  301.       (void) four(fp);    /* checksum */
  302. diff -cr old/pxl_open.c new/pxl_open.c
  303. *** old/pxl_open.c    Sun Feb  4 13:09:36 1990
  304. --- new/pxl_open.c    Sun Dec 10 20:50:59 1989
  305. ***************
  306. *** 33,40 ****
  307. --- 33,53 ----
  308.    */
  309.   
  310.   #include <stdio.h>
  311. + #ifndef X10
  312. + #include <X11/Xos.h>    /* same as below */
  313. + #else X10
  314. + #ifdef    SYSV
  315.   #include <string.h>
  316. + #define index strchr
  317. + #define rindex strrchr
  318. + #else /* SYSV */
  319. + #include <strings.h>
  320. + #endif /* SYSV */
  321. + #endif X10
  322.   #include <errno.h>
  323. + extern    int    errno;
  324.   
  325.   #define    PATH_SEP    ':'
  326.   #define    DEFAULT_TAIL    "/%f.%d%p"
  327. ***************
  328. *** 57,67 ****
  329.   
  330.   read_font_index_proc read_GF_index, read_PK_index, read_PXL_index;
  331.   
  332. ! #ifndef    ANSI_LIB
  333.   char    *sprintf();
  334. ! #endif
  335. ! char    *malloc(), *index(), *getenv();
  336.   
  337.   double    atof();
  338.   
  339.   #define    Strcpy    (void) strcpy
  340. --- 70,80 ----
  341.   
  342.   read_font_index_proc read_GF_index, read_PK_index, read_PXL_index;
  343.   
  344. ! #ifdef    sun
  345.   char    *sprintf();
  346. ! #endif    sun
  347.   
  348. + char    *malloc(), *getenv();
  349.   double    atof();
  350.   
  351.   #define    Strcpy    (void) strcpy
  352. diff -cr old/xdvi.c new/xdvi.c
  353. *** old/xdvi.c    Sun Feb  4 13:09:45 1990
  354. --- new/xdvi.c    Sat Feb  3 18:51:25 1990
  355. ***************
  356. *** 39,49 ****
  357.   #endif    ALTFONT
  358.   
  359.   #ifndef    A4
  360. ! #define    DEFAULT_PAGE_WIDTH    "8.5"
  361. ! #define    DEFAULT_PAGE_HEIGHT    "11"
  362.   #else    A4
  363. ! #define    DEFAULT_PAGE_WIDTH    "8.3"
  364. ! #define    DEFAULT_PAGE_HEIGHT    "11.7"
  365.   #endif    A4
  366.   
  367.   #if    !defined(X10) && !defined(NOTOOL)
  368. --- 39,47 ----
  369.   #endif    ALTFONT
  370.   
  371.   #ifndef    A4
  372. ! #define    DEFAULT_PAPER        "us"
  373.   #else    A4
  374. ! #define    DEFAULT_PAPER        "a4"
  375.   #endif    A4
  376.   
  377.   #if    !defined(X10) && !defined(NOTOOL)
  378. ***************
  379. *** 143,150 ****
  380.   int    density = 40;
  381.   int    pixels_per_inch = 300;
  382.   int    unshrunk_page_w, unshrunk_page_h;
  383. ! static    char    *arg_page_w    = DEFAULT_PAGE_WIDTH;
  384. ! static    char    *arg_page_h    = DEFAULT_PAGE_HEIGHT;
  385.   static    char    *margins, *sidemargin, *topmargin;
  386.   static    Boolean    reverse;
  387.   static    Dimension    bwidth    = 2;
  388. --- 141,147 ----
  389.   int    density = 40;
  390.   int    pixels_per_inch = 300;
  391.   int    unshrunk_page_w, unshrunk_page_h;
  392. ! static    char    *paper        = DEFAULT_PAPER;
  393.   static    char    *margins, *sidemargin, *topmargin;
  394.   static    Boolean    reverse;
  395.   static    Dimension    bwidth    = 2;
  396. ***************
  397. *** 187,193 ****
  398.   #endif X10
  399.   
  400.   int    page_w, page_h;
  401. - static    int    screen_w, screen_h;
  402.   #define    clip_w    mane.width
  403.   #define    clip_h    mane.height
  404.   static    Dimension    window_w, window_h;
  405. --- 184,189 ----
  406. ***************
  407. *** 229,235 ****
  408.       {XtNbottom,    (XtArgVal) XtChainBottom},
  409.       {XtNleft,    (XtArgVal) XtChainLeft},
  410.       {XtNright,    (XtArgVal) XtChainRight},
  411. -     {XtNresizable,    (XtArgVal) True},
  412.   #endif    BUTTONS
  413.       {XtNallowHoriz,    (XtArgVal) True},
  414.       {XtNallowVert,    (XtArgVal) True},
  415. --- 225,230 ----
  416. ***************
  417. *** 262,271 ****
  418.       }
  419.       command_table[] = {
  420.           {"Quit",    "quit",        'q',        50},
  421. !         {"X1 Mag",    "sh1",        1 << 8 | 's',    150},
  422. !         {"X2 Mag",    "sh2",        2 << 8 | 's',    200},
  423. !         {"X3 Mag",    "sh3",        3 << 8 | 's',    250},
  424. !         {"X4 Mag",    "sh4",        4 << 8 | 's',    300},
  425.           {"Next",    "next",        'n',        400},
  426.           {"Page+5",    "next5",    5 << 8 | 'n',    450},
  427.           {"Page+10",    "next10",    10 << 8 | 'n',    500},
  428. --- 257,266 ----
  429.       }
  430.       command_table[] = {
  431.           {"Quit",    "quit",        'q',        50},
  432. !         {"Shrink1",    "sh1",        1 << 8 | 's',    150},
  433. !         {"Shrink2",    "sh2",        2 << 8 | 's',    200},
  434. !         {"Shrink3",    "sh3",        3 << 8 | 's',    250},
  435. !         {"Shrink4",    "sh4",        4 << 8 | 's',    300},
  436.           {"Next",    "next",        'n',        400},
  437.           {"Page+5",    "next5",    5 << 8 | 'n',    450},
  438.           {"Page+10",    "next10",    10 << 8 | 'n',    500},
  439. ***************
  440. *** 287,294 ****
  441.       {XtNlabel,    NULL},
  442.       {XtNvertDistance, (XtArgVal) 0},
  443.       {XtNfromHoriz,    (XtArgVal) NULL},
  444. !     {XtNhorizDistance, (XtArgVal) 9},
  445. !     {XtNwidth,    (XtArgVal) 60},
  446.       {XtNheight,    (XtArgVal) 30},
  447.       {XtNtop,    (XtArgVal) XtChainTop},
  448.       {XtNbottom,    (XtArgVal) XtChainTop},
  449. --- 282,289 ----
  450.       {XtNlabel,    NULL},
  451.       {XtNvertDistance, (XtArgVal) 0},
  452.       {XtNfromHoriz,    (XtArgVal) NULL},
  453. !     {XtNhorizDistance, (XtArgVal) 7},
  454. !     {XtNwidth,    (XtArgVal) 64},
  455.       {XtNheight,    (XtArgVal) 30},
  456.       {XtNtop,    (XtArgVal) XtChainTop},
  457.       {XtNbottom,    (XtArgVal) XtChainTop},
  458. ***************
  459. *** 307,318 ****
  460.       {XtNbottom,    (XtArgVal) XtChainBottom},
  461.       {XtNleft,    (XtArgVal) XtChainRight},
  462.       {XtNright,    (XtArgVal) XtChainRight},
  463. -     {XtNresizable,    (XtArgVal) True},
  464.   };
  465.   
  466.   static    Arg    strut_args[] = {
  467.       {XtNfromHoriz,    (XtArgVal) NULL},
  468.       {XtNwidth,    (XtArgVal) 78},
  469.       {XtNmappedWhenManaged, (XtArgVal) False},
  470.       {XtNborderWidth, (XtArgVal) 0},
  471.       {XtNtop,    (XtArgVal) XtChainTop},
  472. --- 302,313 ----
  473.       {XtNbottom,    (XtArgVal) XtChainBottom},
  474.       {XtNleft,    (XtArgVal) XtChainRight},
  475.       {XtNright,    (XtArgVal) XtChainRight},
  476.   };
  477.   
  478.   static    Arg    strut_args[] = {
  479.       {XtNfromHoriz,    (XtArgVal) NULL},
  480.       {XtNwidth,    (XtArgVal) 78},
  481. +     {XtNheight,    (XtArgVal) 2},
  482.       {XtNmappedWhenManaged, (XtArgVal) False},
  483.       {XtNborderWidth, (XtArgVal) 0},
  484.       {XtNtop,    (XtArgVal) XtChainTop},
  485. ***************
  486. *** 373,383 ****
  487.   #endif    X10
  488.   #endif    lint
  489.   
  490. ! #ifndef    ANSI_LIB
  491.   char    *sprintf();
  492. ! #endif
  493. ! char    *malloc(), *index(), *rindex(), *strcpy(), *strcat();
  494.   
  495.   double    atof();
  496.   
  497.   /********************************
  498. --- 368,378 ----
  499.   #endif    X10
  500.   #endif    lint
  501.   
  502. ! #ifdef    sun
  503.   char    *sprintf();
  504. ! #endif    sun
  505.   
  506. + char    *malloc();
  507.   double    atof();
  508.   
  509.   /********************************
  510. ***************
  511. *** 733,745 ****
  512.           DarkenArea(x_bar, new_x_bgn, 1, new_x_end - new_x_bgn, BAR_WID);
  513.       }
  514.       else {        /* this stuff avoids flicker */
  515. !         if (x_bgn <= new_x_bgn)
  516.           ClearArea(x_bar, x_bgn, 1, new_x_bgn - x_bgn, BAR_WID);
  517. !         else
  518.           DarkenArea(x_bar, new_x_bgn, 1, x_bgn - new_x_bgn, BAR_WID);
  519. !         if (new_x_end <= x_end)
  520.           ClearArea(x_bar, new_x_end, 1, x_end - new_x_end, BAR_WID);
  521. !         else
  522.           DarkenArea(x_bar, x_end, 1, new_x_end - x_end, BAR_WID);
  523.       }
  524.       x_bgn = new_x_bgn;
  525. --- 728,740 ----
  526.           DarkenArea(x_bar, new_x_bgn, 1, new_x_end - new_x_bgn, BAR_WID);
  527.       }
  528.       else {        /* this stuff avoids flicker */
  529. !         if (x_bgn < new_x_bgn)
  530.           ClearArea(x_bar, x_bgn, 1, new_x_bgn - x_bgn, BAR_WID);
  531. !         else if (x_bgn > new_x_bgn)
  532.           DarkenArea(x_bar, new_x_bgn, 1, x_bgn - new_x_bgn, BAR_WID);
  533. !         if (new_x_end < x_end)
  534.           ClearArea(x_bar, new_x_end, 1, x_end - new_x_end, BAR_WID);
  535. !         else if (new_x_end > x_end)
  536.           DarkenArea(x_bar, x_end, 1, new_x_end - x_end, BAR_WID);
  537.       }
  538.       x_bgn = new_x_bgn;
  539. ***************
  540. *** 757,769 ****
  541.           DarkenArea(y_bar, 1, new_y_bgn, BAR_WID, new_y_end - new_y_bgn);
  542.       }
  543.       else {        /* this stuff avoids flicker */
  544. !         if (y_bgn <= new_y_bgn)
  545.           ClearArea(y_bar, 1, y_bgn, BAR_WID, new_y_bgn - y_bgn);
  546. !         else
  547.           DarkenArea(y_bar, 1, new_y_bgn, BAR_WID, y_bgn - new_y_bgn);
  548. !         if (new_y_end <= y_end)
  549.           ClearArea(y_bar, 1, new_y_end, BAR_WID, y_end - new_y_end);
  550. !         else
  551.           DarkenArea(y_bar, 1, y_end, BAR_WID, new_y_end - y_end);
  552.       }
  553.       y_bgn = new_y_bgn;
  554. --- 752,764 ----
  555.           DarkenArea(y_bar, 1, new_y_bgn, BAR_WID, new_y_end - new_y_bgn);
  556.       }
  557.       else {        /* this stuff avoids flicker */
  558. !         if (y_bgn < new_y_bgn)
  559.           ClearArea(y_bar, 1, y_bgn, BAR_WID, new_y_bgn - y_bgn);
  560. !         else if (y_bgn > new_y_bgn)
  561.           DarkenArea(y_bar, 1, new_y_bgn, BAR_WID, y_bgn - new_y_bgn);
  562. !         if (new_y_end < y_end)
  563.           ClearArea(y_bar, 1, new_y_end, BAR_WID, y_end - new_y_end);
  564. !         else if (new_y_end > y_end)
  565.           DarkenArea(y_bar, 1, y_end, BAR_WID, new_y_end - y_end);
  566.       }
  567.       y_bgn = new_y_bgn;
  568. ***************
  569. *** 1140,1146 ****
  570.           case '\b':
  571.           case '\177':    /* Del */
  572.           /* scroll backward */
  573. !         next_page = current_page - 1;
  574.           break;
  575.           case 'g':
  576.           /* go to absolute page */
  577. --- 1135,1141 ----
  578.           case '\b':
  579.           case '\177':    /* Del */
  580.           /* scroll backward */
  581. !         next_page = current_page - (arg0 ? number0 : 1);
  582.           break;
  583.           case 'g':
  584.           /* go to absolute page */
  585. ***************
  586. *** 1259,1270 ****
  587.           get_geom();
  588.           home(False);
  589.           XMapWindow(DISP, (Window) mane.win);
  590. !         return;
  591.   #else    TOOLKIT
  592.           reconfig();
  593.           home(False);
  594. -         break;
  595.   #endif    TOOLKIT
  596.           case 'S':
  597.           if (!arg0) goto bad;
  598.           if (number0 < 0) goto bad;
  599. --- 1254,1270 ----
  600.           get_geom();
  601.           home(False);
  602.           XMapWindow(DISP, (Window) mane.win);
  603. !         /* Wait for next event; this will likely be an expose event,
  604. !            so we don't redraw the window twice. */
  605. !         {
  606. !             XEvent event;
  607. !             XPeekEvent(DISP, &event);
  608. !         }
  609.   #else    TOOLKIT
  610.           reconfig();
  611.           home(False);
  612.   #endif    TOOLKIT
  613. +         break;
  614.           case 'S':
  615.           if (!arg0) goto bad;
  616.           if (number0 < 0) goto bad;
  617. ***************
  618. *** 1459,1473 ****
  619.               if (XANY(event).window == top_level &&
  620.               (XCONFIG(event).width != window_w ||
  621.               XCONFIG(event).height != window_h)) {
  622. !                 register Dimension old_window_w = window_w;
  623.   
  624.                   window_w = XCONFIG(event).width;
  625.                   window_h = XCONFIG(event).height;
  626.                   reconfig();
  627. !                 if (old_window_w == 0) home(False);
  628.               }
  629.               break;
  630.   
  631.           case KeyPress:
  632.   #ifndef X10
  633.               string = trbuf;
  634. --- 1459,1482 ----
  635.               if (XANY(event).window == top_level &&
  636.               (XCONFIG(event).width != window_w ||
  637.               XCONFIG(event).height != window_h)) {
  638. !                 register caddr_t old_mane_win = mane.win;
  639.   
  640.                   window_w = XCONFIG(event).width;
  641.                   window_h = XCONFIG(event).height;
  642.                   reconfig();
  643. !                 if (old_mane_win == NULL) home(False);
  644.               }
  645.               break;
  646.   
  647. + #ifndef X10
  648. +         case MapNotify:        /* if running w/o WM */
  649. +             if (mane.win == NULL) {
  650. +             reconfig();
  651. +             home(False);
  652. +             }
  653. +             break;
  654. + #endif X10
  655.           case KeyPress:
  656.   #ifndef X10
  657.               string = trbuf;
  658. ***************
  659. *** 1657,1665 ****
  660.       [-fg <color>] [-bg <color>] [-hl <color>] [-bd <color>] \
  661.   [-cr <color>]\n\
  662.       [-margins <inches>] [-sidemargin <inches>] [-topmargin <inches>]\n\
  663. !     [-pagewidth <inches>] [-pageheight <inches>] [-mgs[n] <size>]\n\
  664. !     [-altfont <font>] [#<geometry>] [-geometry <geometry>]\n\
  665. !     [-display <host:display>] [-copy] [-thorough] dvi_file\n", stderr);
  666.   #else X10
  667.       fputs("\
  668.   Usage: xdvi [+[<page>]] [-s <shrink>] [-S <density>] [-p <pixels>] [-l] [-rv]\n\
  669. --- 1666,1674 ----
  670.       [-fg <color>] [-bg <color>] [-hl <color>] [-bd <color>] \
  671.   [-cr <color>]\n\
  672.       [-margins <inches>] [-sidemargin <inches>] [-topmargin <inches>]\n\
  673. !     [-paper <papertype>] [-mgs[n] <size>] [-altfont <font>]\n\
  674. !     [#<geometry>] [-geometry <geometry>] [-display <host:display>]\n\
  675. !     [-copy] [-thorough] dvi_file\n", stderr);
  676.   #else X10
  677.       fputs("\
  678.   Usage: xdvi [+[<page>]] [-s <shrink>] [-S <density>] [-p <pixels>] [-l] [-rv]\n\
  679. ***************
  680. *** 1666,1673 ****
  681.       [-fg <color>] [-bg <color>] [-hl <color>] [-bd <color>] \
  682.   [-cr <color>]\n\
  683.       [-margins <inches>] [-sidemargin <inches>] [-topmargin <inches>]\n\
  684. !     [-pagewidth <inches>] [-pageheight <inches>] [-mgs[n] <size>]\n\
  685. !     [-altfont <font>] [-geometry <geometry> | =<geometry>]\n\
  686.       [-display <host:display> | <host:display>] dvi_file\n", stderr);
  687.   #endif X10
  688.       exit(1);
  689. --- 1675,1682 ----
  690.       [-fg <color>] [-bg <color>] [-hl <color>] [-bd <color>] \
  691.   [-cr <color>]\n\
  692.       [-margins <inches>] [-sidemargin <inches>] [-topmargin <inches>]\n\
  693. !     [-paper <papertype>] [-mgs[n] <size>] [-altfont <font>]\n\
  694. !     [-geometry <geometry> | =<geometry>]\n\
  695.       [-display <host:display> | <host:display>] dvi_file\n", stderr);
  696.   #endif X10
  697.       exit(1);
  698. ***************
  699. *** 1735,1744 ****
  700.     (Cardinal) &sidemargin, XtRString, NULL},
  701.   {"topMargin", "Margin", XtRString, sizeof(char *),
  702.     (Cardinal) &topmargin, XtRString, NULL},
  703. ! {"pageWidth", "PageWidth", XtRString, sizeof(char *),
  704. !   (Cardinal) &arg_page_w, XtRString, (caddr_t) DEFAULT_PAGE_WIDTH},
  705. ! {"pageHeight", "PageHeight", XtRString, sizeof(char *),
  706. !   (Cardinal) &arg_page_h, XtRString, (caddr_t) DEFAULT_PAGE_HEIGHT},
  707.   {"altFont", "AltFont", XtRString, sizeof(char *),
  708.     (Cardinal) &alt_font, XtRString, (caddr_t) ALTFONT},
  709.   {"listFonts", "ListFonts", XtRBoolean, sizeof(Boolean),
  710. --- 1744,1751 ----
  711.     (Cardinal) &sidemargin, XtRString, NULL},
  712.   {"topMargin", "Margin", XtRString, sizeof(char *),
  713.     (Cardinal) &topmargin, XtRString, NULL},
  714. ! {"paper", "Paper", XtRString, sizeof(char *),
  715. !   (Cardinal) &paper, XtRString, (caddr_t) DEFAULT_PAPER},
  716.   {"altFont", "AltFont", XtRString, sizeof(char *),
  717.     (Cardinal) &alt_font, XtRString, (caddr_t) ALTFONT},
  718.   {"listFonts", "ListFonts", XtRBoolean, sizeof(Boolean),
  719. ***************
  720. *** 1855,1862 ****
  721.   {"-sidemargin",    "sideMargin",    SepArg,    StringArg,    (caddr_t) &sidemargin},
  722.   {"-topmargin",    "topMargin",    SepArg,    StringArg,    (caddr_t) &topmargin},
  723.   {"-altfont",    "altFont",    SepArg,    StringArg,    (caddr_t) &alt_font},
  724. ! {"-pagewidth",    "pageWidth",    SepArg,    StringArg,    (caddr_t) &arg_page_w},
  725. ! {"-pageheight",    "pageHeight",    SepArg,    StringArg,    (caddr_t) &arg_page_h},
  726.   {"-l",        "listFonts",    TrueArg, BooleanArg,    (caddr_t) &list_fonts},
  727.   {"+l",        NULL,        FalseArg, BooleanArg,    (caddr_t) &list_fonts},
  728.   {"-rv",        "reverseVideo",    TrueArg, BooleanArg,    (caddr_t) &reverse},
  729. --- 1862,1868 ----
  730.   {"-sidemargin",    "sideMargin",    SepArg,    StringArg,    (caddr_t) &sidemargin},
  731.   {"-topmargin",    "topMargin",    SepArg,    StringArg,    (caddr_t) &topmargin},
  732.   {"-altfont",    "altFont",    SepArg,    StringArg,    (caddr_t) &alt_font},
  733. ! {"-paper",    "paper",    SepArg,    StringArg,    (caddr_t) &paper},
  734.   {"-l",        "listFonts",    TrueArg, BooleanArg,    (caddr_t) &list_fonts},
  735.   {"+l",        NULL,        FalseArg, BooleanArg,    (caddr_t) &list_fonts},
  736.   {"-rv",        "reverseVideo",    TrueArg, BooleanArg,    (caddr_t) &reverse},
  737. ***************
  738. *** 1968,1978 ****
  739.   
  740.   #ifndef X10
  741.       if ((DISP = XOpenDisplay(display)) == NULL)
  742. !         oops("Can't open display\n");
  743.       SCRN = DefaultScreenOfDisplay(DISP);
  744.   #else X10
  745.       if (XOpenDisplay(display) == NULL)
  746. !         oops("Can't open display\n");
  747.   #endif X10
  748.       for (opt = options; opt < options + XtNumber(options); ++opt)
  749.           if (opt->resource &&
  750. --- 1974,1984 ----
  751.   
  752.   #ifndef X10
  753.       if ((DISP = XOpenDisplay(display)) == NULL)
  754. !         oops("Can't open display");
  755.       SCRN = DefaultScreenOfDisplay(DISP);
  756.   #else X10
  757.       if (XOpenDisplay(display) == NULL)
  758. !         oops("Can't open display");
  759.   #endif X10
  760.       for (opt = options; opt < options + XtNumber(options); ++opt)
  761.           if (opt->resource &&
  762. ***************
  763. *** 1997,2002 ****
  764. --- 2003,2106 ----
  765.   
  766.   #endif    TOOLKIT
  767.   
  768. + static    char    *paper_types[] = {
  769. +     "us",        "8.5x11",
  770. +     "usr",        "11x8.5",
  771. +     "legal",    "8.5x14",
  772. +     "foolscap",    "13.5x17.0",    /* ??? */
  773. +     /* ISO `A' formats, Portrait */
  774. +     "a1",        "59.4x84.0cm",
  775. +     "a2",        "42.0x59.4cm",
  776. +     "a3",        "29.7x42.0cm",
  777. +     "a4",        "21.0x29.7cm",
  778. +     "a5",        "14.85x21.0cm",
  779. +     "a6",        "10.5x14.85cm",
  780. +     "a7",        "7.42x10.5cm",
  781. +     /* ISO `A' formats, Landscape */
  782. +     "a1r",        "84.0x59.4cm",
  783. +     "a2r",        "59.4x42.0cm",
  784. +     "a3r",        "42.0x29.7cm",
  785. +     "a4r",        "29.7x21.0cm",
  786. +     "a5r",        "21.0x14.85cm",
  787. +     "a6r",        "14.85x10.5cm",
  788. +     "a7r",        "10.5x7.42cm",
  789. +     /* ISO `B' formats, Portrait */
  790. +     "b1",        "70.6x100.0cm",
  791. +     "b2",        "50.0x70.6cm",
  792. +     "b3",        "35.3x50.0cm",
  793. +     "b4",        "25.0x35.3cm",
  794. +     "b5",        "17.6x25.0cm",
  795. +     "b6",        "13.5x17.6cm",
  796. +     "b7",        "8.8x13.5cm",
  797. +     /* ISO `B' formats, Landscape */
  798. +     "b1r",        "100.0x70.6cm",
  799. +     "b2r",        "70.6x50.0cm",
  800. +     "b3r",        "50.0x35.3cm",
  801. +     "b4r",        "35.3x25.0cm",
  802. +     "b5r",        "25.0x17.6cm",
  803. +     "b6r",        "17.6x13.5cm",
  804. +     "b7r",        "13.5x8.8cm",
  805. +     /* ISO `C' formats, Portrait */
  806. +     "c1",        "64.8x91.6cm",
  807. +     "c2",        "45.8x64.8cm",
  808. +     "c3",        "32.4x45.8cm",
  809. +     "c4",        "22.9x32.4cm",
  810. +     "c5",        "16.2x22.9cm",
  811. +     "c6",        "11.46x16.2cm",
  812. +     "c7",        "8.1x11.46cm",
  813. +     /* ISO `C' formats, Landscape */
  814. +     "c1r",        "91.6x64.8cm",
  815. +     "c2r",        "64.8x45.8cm",
  816. +     "c3r",        "45.8x32.4cm",
  817. +     "c4r",        "32.4x22.9cm",
  818. +     "c5r",        "22.9x16.2cm",
  819. +     "c6r",        "16.2x11.46cm",
  820. +     "c7r",        "11.46x8.1cm",
  821. + };
  822. + static    Boolean
  823. + set_paper_type() {
  824. +     char    temp[21];
  825. +     int    i;
  826. +     double    factor    = 1.0;
  827. +     char    c;
  828. +     char    **p;
  829. +     char    *q;
  830. +     if (strlen(paper) > 20) return False;
  831. +     i = 0;
  832. +     for (;;) {    /* convert to lower case */
  833. +         c = paper[i];
  834. +         if (c >= 'A' && c <= 'Z') c ^= ('a' ^ 'A');
  835. +         temp[i] = c;
  836. +         if (c == '\0') break;
  837. +         ++i;
  838. +     }
  839. +     /* perform substitutions */
  840. +     for (p = paper_types; p < paper_types + XtNumber(paper_types); p += 2)
  841. +         if (strcmp(temp, *p) == 0) {
  842. +         (void) strcpy(temp, p[1]);
  843. +         break;
  844. +         }
  845. +     if (i > 2 && strcmp(temp + i - 2, "cm") == 0) {
  846. +         factor = 1.0 / 2.54;
  847. +         temp[i - 2] = '\0';
  848. +     }
  849. +     q = index(temp, 'x');
  850. +     if (q == NULL) return False;
  851. +     *q = '\0';
  852. +     factor *= pixels_per_inch;
  853. +     unshrunk_page_w = atof(temp) * factor + 0.5;
  854. +     unshrunk_page_h = atof(q + 1) * factor + 0.5;
  855. +     return (unshrunk_page_w != 0 && unshrunk_page_h != 0);
  856. + }
  857.   /*
  858.    *    main program
  859.    */
  860. ***************
  861. *** 2015,2022 ****
  862. --- 2119,2128 ----
  863.       char    def[32];
  864.       int    mouspix;
  865.       Color    cdef;
  866. +     int    x_thick, y_thick;
  867.   #endif X10
  868.   #endif    TOOLKIT
  869. +     int    screen_w, screen_h;
  870.   
  871.       prog = rindex(*argv, '/');
  872.       if (prog != NULL) ++prog; else prog = *argv;
  873. ***************
  874. *** 2055,2062 ****
  875.       if (margins) home_x = home_y = atof(margins) * pixels_per_inch;
  876.       if (sidemargin) home_x = atof(sidemargin) * pixels_per_inch;
  877.       if (topmargin) home_y = atof(topmargin) * pixels_per_inch;
  878. !     unshrunk_page_w = atof(arg_page_w) * pixels_per_inch + 0.5;
  879. !     unshrunk_page_h = atof(arg_page_h) * pixels_per_inch + 0.5;
  880.   
  881.       init_pxl_open();
  882.       open_dvi_file();
  883. --- 2161,2167 ----
  884.       if (margins) home_x = home_y = atof(margins) * pixels_per_inch;
  885.       if (sidemargin) home_x = atof(sidemargin) * pixels_per_inch;
  886.       if (topmargin) home_y = atof(topmargin) * pixels_per_inch;
  887. !     if (!set_paper_type()) oops("Don't recognize paper type %s", paper);
  888.   
  889.       init_pxl_open();
  890.       open_dvi_file();
  891. ***************
  892. *** 2228,2250 ****
  893.       size_hints.x = size_hints.y = 0;
  894.       if (geometry != NULL) {
  895.           int flag = XParseGeometry(geometry, &size_hints.x, &size_hints.y,
  896. !         &size_hints.width, &size_hints.height);
  897.   
  898.           if (flag & (XValue | YValue))
  899. !         size_hints.flags |= USSize | USPosition;
  900.           if (flag & (WidthValue | HeightValue))
  901.           size_hints.flags |= USSize;
  902. !         if (flag & XNegative) size_hints.x += screen_w - size_hints.width;
  903. !         if (flag & YNegative) size_hints.y += screen_h - size_hints.height;
  904.       }
  905.       if (!(size_hints.flags & USSize)) {
  906.           size_hints.flags |= PSize;
  907. -         size_hints.width = page_w < screen_w ? page_w : screen_w;
  908. -         size_hints.height = page_h < screen_h ? page_h : screen_h;
  909.       }
  910.       top_level = XCreateSimpleWindow(DISP, RootWindowOfScreen(SCRN),
  911. !         size_hints.x, size_hints.y, size_hints.width, size_hints.height,
  912. !         bwidth, fore_Pixel, back_Pixel);
  913.       XSetStandardProperties(DISP, top_level, dvi_name, prog, NULL,
  914.           argv, argc, &size_hints);
  915.   
  916. --- 2333,2366 ----
  917.       size_hints.x = size_hints.y = 0;
  918.       if (geometry != NULL) {
  919.           int flag = XParseGeometry(geometry, &size_hints.x, &size_hints.y,
  920. !         &window_w, &window_h);
  921.   
  922.           if (flag & (XValue | YValue))
  923. !         size_hints.flags |= USPosition;
  924.           if (flag & (WidthValue | HeightValue))
  925.           size_hints.flags |= USSize;
  926. !         if (flag & XNegative) size_hints.x += screen_w - window_w;
  927. !         if (flag & YNegative) size_hints.y += screen_h - window_h;
  928.       }
  929.       if (!(size_hints.flags & USSize)) {
  930. +         int x_thick = 0;
  931. +         int y_thick = 0;
  932. +         if (screen_w < page_w) x_thick = BAR_THICK;
  933. +         if (screen_h < page_h + x_thick) y_thick = BAR_THICK;
  934. +         window_w = page_w + y_thick;
  935. +         if (window_w > screen_w) {
  936. +         x_thick = BAR_THICK;
  937. +         window_w = screen_w;
  938. +         }
  939. +         window_h = page_h + x_thick;
  940. +         if (window_h > screen_h) window_h = screen_h;
  941.           size_hints.flags |= PSize;
  942.       }
  943. +     size_hints.width = window_w;
  944. +     size_hints.height = window_h;
  945.       top_level = XCreateSimpleWindow(DISP, RootWindowOfScreen(SCRN),
  946. !         size_hints.x, size_hints.y, window_w, window_h, bwidth,
  947. !         fore_Pixel, back_Pixel);
  948.       XSetStandardProperties(DISP, top_level, dvi_name, prog, NULL,
  949.           argv, argc, &size_hints);
  950.   
  951. ***************
  952. *** 2331,2338 ****
  953.       frame.bdrwidth = bwidth;
  954.       screen_w = DisplayWidth() - 2*bwidth;
  955.       screen_h = DisplayHeight() - 2*bwidth;
  956. !     frame.width = (page_w < screen_w ? page_w : screen_w);
  957. !     frame.height = (page_h < screen_h ? page_h : screen_h);
  958.       frame.border = bdrmap;
  959.       frame.background = backmap;
  960.       frame.x = 0;
  961. --- 2447,2462 ----
  962.       frame.bdrwidth = bwidth;
  963.       screen_w = DisplayWidth() - 2*bwidth;
  964.       screen_h = DisplayHeight() - 2*bwidth;
  965. !     x_thick = y_thick = 0;
  966. !     if (screen_w < page_w) x_thick = BAR_THICK;
  967. !     if (screen_h < page_h + x_thick) y_thick = BAR_THICK;
  968. !     frame.width = page_w + y_thick;
  969. !     if (frame.width > screen_w) {
  970. !         x_thick = BAR_THICK;
  971. !         frame.width = screen_w;
  972. !     }
  973. !     frame.height = page_h + x_thick;
  974. !     if (frame.height > screen_h) frame.height = screen_h;
  975.       frame.border = bdrmap;
  976.       frame.background = backmap;
  977.       frame.x = 0;
  978. diff -cr old/xdvi.h new/xdvi.h
  979. *** old/xdvi.h    Sun Feb  4 13:09:47 1990
  980. --- new/xdvi.h    Sun Dec 10 20:29:55 1989
  981. ***************
  982. *** 7,13 ****
  983. --- 7,23 ----
  984.   #include <X11/Xos.h>    /* same as below */
  985.   #else X10
  986.   #include <sys/types.h>    /* for sites without X11 */
  987. + #ifdef    SYSV
  988. + #include <string.h>
  989. + #define index strchr
  990. + #define rindex strrchr
  991. + #include <fcntl.h>
  992. + #else /* SYSV */
  993. + #include <strings.h>
  994. + #endif /* SYSV */
  995. + #include <sys/file.h>
  996.   #endif X10
  997.   #include <setjmp.h>
  998.   
  999.   #define    OPEN_MODE    "r"
  1000. diff -cr old/xdvi.man.sed new/xdvi.man.sed
  1001. *** old/xdvi.man.sed    Sun Feb  4 13:09:50 1990
  1002. --- new/xdvi.man.sed    Sun Feb  4 13:28:33 1990
  1003. ***************
  1004. *** 12,19 ****
  1005.   [\-l] [\-rv] [\-fg \fIcolor\fP] [\-bg \fIcolor\fP]
  1006.   [\-hl \fIcolor\fP] [\-bd \fIcolor\fP] [\-cr \fIcolor\fP]
  1007.   [\-margins \fIinches\fP] [\-sidemargin \fIinches\fP] [\-topmargin \fIinches\fP]
  1008. ! [\-pagewidth \fIinches\fP] [\-pageheight \fIinches\fP]
  1009. ! [\-mgs[\fIn\fP] \fIsize\fP] [\-altfont \fIfont\fP]
  1010.   #ifx11
  1011.   [#\fIgeometry\fP] [\-geometry \fIgeometry\fP] [\-display \fIdisplay\fP]
  1012.   [-copy] [-thorough]
  1013. --- 12,18 ----
  1014.   [\-l] [\-rv] [\-fg \fIcolor\fP] [\-bg \fIcolor\fP]
  1015.   [\-hl \fIcolor\fP] [\-bd \fIcolor\fP] [\-cr \fIcolor\fP]
  1016.   [\-margins \fIinches\fP] [\-sidemargin \fIinches\fP] [\-topmargin \fIinches\fP]
  1017. ! [\-paper \fIpapertype\fP] [\-mgs[\fIn\fP] \fIsize\fP] [\-altfont \fIfont\fP]
  1018.   #ifx11
  1019.   [#\fIgeometry\fP] [\-geometry \fIgeometry\fP] [\-display \fIdisplay\fP]
  1020.   [-copy] [-thorough]
  1021. ***************
  1022. *** 156,162 ****
  1023.   still cannot fit in the window, then the page is put in the window such that
  1024.   the top and left margins are hidden, and presumably the upper left-hand corner
  1025.   of the text on the page will be in the upper left-hand corner of the window.
  1026. ! Otherwise, the text is centered in the window.  See also `\fBH\fR' under
  1027.   the KEY\%STROKES section.
  1028.   .TP
  1029.   .BI \-sidemargin " inches"
  1030. --- 155,161 ----
  1031.   still cannot fit in the window, then the page is put in the window such that
  1032.   the top and left margins are hidden, and presumably the upper left-hand corner
  1033.   of the text on the page will be in the upper left-hand corner of the window.
  1034. ! Otherwise, the text is centered in the window.  See also `\fBM\fR' under
  1035.   the KEY\%STROKES section.
  1036.   .TP
  1037.   .BI \-sidemargin " inches"
  1038. ***************
  1039. *** 167,180 ****
  1040.   (%%dot%%topMargin)
  1041.   Specifies the top and bottom margins (see above).
  1042.   .TP
  1043. ! .BI \-pagewidth " inches"
  1044. ! (%%dot%%pageWidth)
  1045. ! Specifies the width of the printed page.
  1046. ! .TP
  1047. ! .BI \-pageheight " inches"
  1048. ! (%%dot%%pageHeight)
  1049. ! Specifies the height of the printed page.  By default, the page size
  1050. ! is %%defaultpagesize%%.
  1051.   .TP
  1052.   #ifx11
  1053.   .BI "\-mgs[n]" " size"
  1054. --- 166,180 ----
  1055.   (%%dot%%topMargin)
  1056.   Specifies the top and bottom margins (see above).
  1057.   .TP
  1058. ! .BI \-paper " papertype"
  1059. ! (%%dot%%paper)
  1060. ! Specifies the size of the printed page.  This may be of the form
  1061. ! \fIw\fRx\fIh\fR (or \fIw\fRx\fIh\fRcm), where \fIw\fR is the width in
  1062. ! inches (or cm) and \fIh\fR is the height in inches (or cm), respectively.
  1063. ! There are also synonyms which may be used:  us (8.5x11), usr (11x8.5),
  1064. ! legal (8.5x14), foolscap (13.5x17), as well as the ISO sizes a1-a7,
  1065. ! b1-b7, c1-c7, a1r-a7r (a1-a7 rotated), etc.  The default size is
  1066. ! %%defaultpagesize%%.
  1067.   .TP
  1068.   #ifx11
  1069.   .BI "\-mgs[n]" " size"
  1070.  
  1071. dan
  1072. -----------------------------------------------------------
  1073.             O'Reilly && Associates
  1074.         argv@sun.com / argv@ora.com
  1075.        632 Petaluma Ave, Sebastopol, CA 95472 
  1076.      800-338-NUTS, in CA: 800-533-NUTS, FAX 707-829-0104
  1077.     Opinions expressed reflect those of the author only.
  1078.